package com.hcb.controller;

import com.hcb.common.ActionEvent;
import com.hcb.constants.Constants;
import com.hcb.model.utils.CustomerModel;

public class CustomerController {
	public static CustomerController instance;
	public static CustomerController getInstance(){
		if(instance == null)
			instance = new CustomerController();
		return instance;
	}
	
	public void handleViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.INSERT_CUSTOMER: {
			CustomerModel.getInstance().handleControllerEvent(e);
			break;
		}
		case Constants.UPDATE_CUSTOMER: {
			CustomerModel.getInstance().handleControllerEvent(e);
			break;
		}
		case Constants.INSERT_CUSTOMER_EXIST: {
			CustomerModel.getInstance().handleControllerEvent(e);
			break;
		}
		
		default:
			break;
		}
	}

	
}
